package com.cplatform.springtestmaven.controller;

import com.cplatform.springtestmaven.domain.Person;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author Administrator
 */
@RestController
@RequestMapping(value = "/api",produces = MediaType.APPLICATION_JSON_VALUE)
public class MyController {

    @RequestMapping(value = "/person")
    public Person getPerson(){
        Person p = new Person();
        p.setId(1);
        p.setBirthday(new Date());
        p.setName("张三");
        return p;
    }
}
